package com.maxatime.pojo;

import com.maxatime.utils.DateUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

//@Data  //代替set get 方法
//@AllArgsConstructor  //全参构造方法
//@NoArgsConstructor   //无参构造方法
public class Exam {


    private Integer pkId;

    private String name;

    private String sex;

    private Date birthday;
    private Integer age;

    private String names;

    private String sexs;

    private Date birthdays;
    private Integer age1;


    private String deleteFlag;

    private Date createTime;

    private Date updateTime;

    private String leancc;



    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
    }

    public String getSexs() {
        return sexs;
    }

    public void setSexs(String sexs) {
        this.sexs = sexs;
    }

    public Date getBirthdays() {
        return birthdays;
    }

    public void setBirthdays(Date birthdays) {
        this.birthdays = birthdays;
    }

    public Integer getAge1() {
        int age=0;
        try {
            age= DateUtils.getAge(birthdays);
        }catch(Exception e) {
            e.printStackTrace();
        }
        return age;
    }

    public void setAge1(Integer age1) {
        this.age1 = age1;
    }

    public String getLeancc() {
        return leancc;
    }

    public void setLeancc(String leancc) {
        this.leancc = leancc;
    }

    public Integer getAge() {
        int age=0;
        try {
            age= DateUtils.getAge(birthday);
        }catch(Exception e) {
            e.printStackTrace();
        }
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getPkId() {
        return pkId;
    }

    public void setPkId(Integer pkId) {
        this.pkId = pkId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}